package com.itheima.网络编程.udp编程;

import java.io.IOException;
import java.net.*;
import java.util.Scanner;

public class 组播 {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        DatagramSocket ds = new DatagramSocket();
        while (true) {
            String next = sc.next();
            DatagramPacket dp = new DatagramPacket(next.getBytes(), next.getBytes
                    ().length , InetAddress.getByName("224.0.1.0"), 16666);
            ds.send(dp);
        }
    }
}
